package com.example.dem11;

import com.example.dem4.BankCard;

/**
 * @program: xian-cheng
 * @description:
 * @author: 诸葛龙辰
 * @create: 2022-11-01 20:54
 **/
public class Pig extends Thread{
    private Bank bank;
    public Pig(Bank bank){
        this.bank=bank;
    }
    @Override
    public void run() {
        for (int i = 0; i <10 ; i++) {
            bank.save(1000);
        }
    }

}
